﻿using System;

namespace CSharp
{
    class Basic
    {
        public static void TestDateTime()
        {
            DateTime dt = DateTime.Now;

            Console.WriteLine("Short date format (d): {0:d}", dt);
            Console.WriteLine("Long date format (D): {0:D}", dt);
            Console.WriteLine("Full date with time without second (f): {0:f}", dt);
            Console.WriteLine("Full date with time with second (F): {0:F}", dt);
            Console.WriteLine("Short date and short time without second (g): {0:g}", dt);
        }

        public static void TestSwap()
        {
            int a = 3, b = 5;

            Swap(ref a, ref b);
            Console.WriteLine("a = {0}, b = {1}", a, b);
        }

        public static void Swap(ref int c, ref int d)
        {
            int t;

            t = c;
            c = d;
            d = t;
        }
    }
}
